{-# OPTIONS_GHC -XDeriveDataTypeable #-}
module WS.XI.Com.Sap.Aii.Ib.Server.Api.Types where
import Data.Typeable
import Data.Time.LocalTime

import WS.Runtime.Xmlable


nss :: [(String, String)]
nss = [("tns","urn:com.sap.aii.ib.server.api.types")]
-- types definition

data ChangeListID__ = ChangeListID__ {
    changeListIDChangeListID :: Maybe String,
    nameChangeListID :: Maybe String,
    descriptionChangeListID :: Maybe LONG_Description__
} deriving (Typeable, Eq) 

data LONG_Description__ = LONG_Description__ {
    languageCodeLONG_Description :: Maybe String,
    valueLONG_Description :: Maybe String
} deriving (Typeable, Eq) 

data ObjectAdministrativeData__ = ObjectAdministrativeData__ {
    responsibleUserAccountIDObjectAdministrativeData :: Maybe String,
    lastChangeDateTimeObjectAdministrativeData :: Maybe LocalTime,
    lastChangeUserAccountIDObjectAdministrativeData :: Maybe String
} deriving (Typeable, Eq) 

data ObjectAdministrativeDataRestricted__ = ObjectAdministrativeDataRestricted__ {
    responsibleUserAccountIDObjectAdministrativeDataRestricted :: Maybe String
} deriving (Typeable, Eq) 

data ArrayOfLONG_Description__ = ArrayOfLONG_Description__ {
    lONG_DescriptionArrayOfLONG_Description :: Maybe [LONG_Description__]
} deriving (Typeable, Eq) 

data ChangeListIDRestricted__ = ChangeListIDRestricted__ {
    nameChangeListIDRestricted :: Maybe String,
    descriptionChangeListIDRestricted :: Maybe LONG_Description__
} deriving (Typeable, Eq) 



-- instances


instance Xmlable ChangeListID__ where
	toContent x = [makeToContent ["tns:ChangeListID", "tns:Name", "tns:Description"] [toContent.changeListIDChangeListID, toContent.nameChangeListID, toContent.descriptionChangeListID] x]
	fromContent cs = ChangeListID__ (fromContent c1) (fromContent c2) (fromContent c3)
		where [c1, c2, c3] = forFromContent nss ["tns:ChangeListID", "tns:Name", "tns:Description"] cs

instance Xmlable LONG_Description__ where
	toContent x = [makeToContent ["tns:languageCode", "tns:value"] [toContent.languageCodeLONG_Description, toContent.valueLONG_Description] x]
	fromContent cs = LONG_Description__ (fromContent c1) (fromContent c2)
		where [c1, c2] = forFromContent nss ["tns:languageCode", "tns:value"] cs

instance Xmlable ObjectAdministrativeData__ where
	toContent x = [makeToContent ["tns:ResponsibleUserAccountID", "tns:LastChangeDateTime", "tns:LastChangeUserAccountID"] [toContent.responsibleUserAccountIDObjectAdministrativeData, toContent.lastChangeDateTimeObjectAdministrativeData, toContent.lastChangeUserAccountIDObjectAdministrativeData] x]
	fromContent cs = ObjectAdministrativeData__ (fromContent c1) (fromContent c2) (fromContent c3)
		where [c1, c2, c3] = forFromContent nss ["tns:ResponsibleUserAccountID", "tns:LastChangeDateTime", "tns:LastChangeUserAccountID"] cs

instance Xmlable ObjectAdministrativeDataRestricted__ where
	toContent x = [makeToContent ["tns:ResponsibleUserAccountID"] [toContent.responsibleUserAccountIDObjectAdministrativeDataRestricted] x]
	fromContent cs = ObjectAdministrativeDataRestricted__ (fromContent c1)
		where [c1] = forFromContent nss ["tns:ResponsibleUserAccountID"] cs

instance Xmlable ArrayOfLONG_Description__ where
	toContent x = [makeToContent ["tns:LONG_Description"] [toContent.lONG_DescriptionArrayOfLONG_Description] x]
	fromContent cs = ArrayOfLONG_Description__ (fromContent c1)
		where [c1] = forFromContent nss ["tns:LONG_Description"] cs

instance Xmlable ChangeListIDRestricted__ where
	toContent x = [makeToContent ["tns:Name", "tns:Description"] [toContent.nameChangeListIDRestricted, toContent.descriptionChangeListIDRestricted] x]
	fromContent cs = ChangeListIDRestricted__ (fromContent c1) (fromContent c2)
		where [c1, c2] = forFromContent nss ["tns:Name", "tns:Description"] cs

